﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WaterRevenueMS.Domain.Common.Models;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace WaterRevenueMS.Domain.ViewModels.BasicSet.RelayType
{
    public class RelayTypeModel : EntityCommon
    {
        public RelayTypeModel()
        {
            Search = new SearchModel();
            RelayItems = new List<SelectListItem>
            {
                new SelectListItem{Text="请选择中继协议",Value="0"},
                new SelectListItem{Text="合肥中继",Value="1"},
                new SelectListItem{Text="CMBUS中继(单通道)",Value="2"},
                new SelectListItem{Text="CMBUS中继(8通道)",Value="3"},
                new SelectListItem{Text="RS485激活中继(8通道)",Value="4"},
                new SelectListItem{Text="数据集中器",Value="5"}
            };
        }

        public int Id { get; set; }

        [Display(Name = "类型名称")]
        [Required(ErrorMessage = "类型名称不能为空")]
        [StringLength(16, ErrorMessage = "类型名称不能大于16个字符")]
        public string Zhong_JLX { get; set; }

        [Display(Name="默认值")]
        public byte DefualtValue { get; set; }

        [Display(Name="排序序号")]
        public int OrderNo { get; set; }

        [Display(Name="中继协议")]
        public byte Zhong_JXY { get; set; }
        public List<SelectListItem> RelayItems { get; set; }

      //  public string zhong_JXY_HZ 
      //  {
        
        
        
        
     //   }

        public SearchModel Search { get; set; }

    }
    public class SearchModel
    {
        public SearchModel()
        {

        }

        [Display(Name = "类型名称")]
        public string Zhong_JLX { get; set; }
    }
}
